package com.hqyj.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hqyj.pojo.PowerList;
import com.hqyj.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hqyj.pojo.UserRoleVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author rock
 * @since 2022-09-30
 */
@Repository
public interface UserMapper extends BaseMapper<User> {

    //根据用户名查询出用户信息和用户角色
//    List<UserRoleVo> queryPage(Page page, @Param("username")String username);
    List<UserRoleVo> queryPage(Page page, UserRoleVo userRoleVo);

    //根据角色Id，角色名和角色对应的权限
    List<PowerList> queryPowerList(Page<PowerList> page, PowerList powerList);

    //查询用户
    User selectUserByName(String userName);

}
